QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Lines

Figure 4 shows a line.

Figure 4 A line

Labels

ASCII
Line
Binary
line ( = 0x6C696E65 )

Data Format

Point3D             start
Point3D             end
start
One endpoint of the line.
end
The other endpoint of the line.

Data Size

24

Description

A line is a straight segment in three-dimensional space defined by its two endpoints. Attributes may be assigned to the vertices of a line and to the entire line.

Default Surface Parameterization

The default surface parameterization for a line is (0, 0) at start and (1, 0) at end .

Parent Hierarchy

Shared, shape, geometry.

Parent Objects

None.

Child Objects

Attribute set (optional), vertex attribute set list (optional). An attribute set may be used to assign attributes to the entire line. The vertex attribute set list may include attribute sets for one or both vertices of the line. For the purpose of attribute assignment, the start and end vertices of a line are indexed by the integers 0 and 1 respectively. See "Vertex Attribute Set Lists" for a description of these lists.

EXAMPLE

Container (
    Line (
        0 0 0
        1 0 0
    )
    Container (
        VertexAttributeSetList ( 2 Exclude 0 )
        Container (
            AttributeSet ( )
            DiffuseColor ( 1 0 0 )
        )
        Container (
            AttributeSet ( )
            DiffuseColor ( 0 0 1 )
        )
    )
)

Default Size

None.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |